import Vue from 'vue'
import VueRouter from 'vue-router'
import backHome from '../views/Home'
import backUser from '../views/User'

Vue.use(VueRouter)

//1.创建路由组件
//2.将组件和路由作映射
//3.创建router实例
    const  routes = [
        {path:'/home',component: backHome},
        {path:'/user',component: backUser}
    ]
    const router = new VueRouter({
        routes //缩写 相当于 routes:routes
    })
    export default router



